package ui;

import javax.swing.*;
import java.awt.*;

public class LayerLevel extends Layer {
    //标题图片
    private   static Image IMG_LEV = new ImageIcon("graphics/string/level.png").getImage();

    private  static  final  int IMG_LEV_W = IMG_LEV.getWidth(null);


    public LayerLevel(int x, int y, int w, int h) {
        super(x,y,w,h);
    }
    public void paint(Graphics g){
        this.createWindow(g);
        //窗口标题
        int centerX = this.w - IMG_LEV_W >> 1;
        g.drawImage(IMG_LEV,this.x + centerX,this.y+PADDING,null);
        /**
         * 显示等级
         */
        this.drawNumberLefetPad(centerX,64,this.dto.getNowLevel(),2,g);
//        this.drawNumberLefetPad(centerX,64,9234,2,g);
    }


}
